Skip to content

impl: fall back to CODER_HEADER_COMMAND when the header command setting is blank - #350

Merged
fioan89 merged 3 commits into
coder:mainfrom
folbricht-ant:header-command-env-fallback
Aug 19, 2026
Merged

impl: fall back to CODER_HEADER_COMMAND when the header command setting is blank#350
fioan89 merged 3 commits into
coder:mainfrom
folbricht-ant:header-command-env-fallback

Conversation

@folbricht-ant

Copy link
Copy Markdown
Contributor

Same change as coder/jetbrains-coder#600 for the Toolbox plugin: CoderSettingsStore.headerCommand falls back to the CODER_HEADER_COMMAND environment variable when the stored setting is empty, matching the Coder CLI and the VS Code extension (src/settings/headers.ts), and following the existing sshConfigOptions / CODER_SSH_CONFIG_OPTIONS fallback in the same class. An unset variable still yields null, so the default is unchanged; an explicitly configured setting still wins. README settings entry and the ReadOnlyCoderSettings doc updated.

Test: CoderSettingsTest.testHeaderCommand (store / env / precedence), mirroring testSSHConfigOptions.

@folbricht-ant

Copy link
Copy Markdown
Contributor Author

Pushed 5345773 to match the wording feedback on coder/jetbrains-coder#600: the headerCommand doc and README no longer mention CODER_URL, and the fallback sentence now reads "When this setting is blank, the CODER_HEADER_COMMAND environment variable is used instead, if set."


internal const val CODER_SSH_CONFIG_OPTIONS = "CODER_SSH_CONFIG_OPTIONS"

internal const val CODER_HEADER_COMMAND = "CODER_HEADER_COMMAND"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: at some point we should split the env keys from the persisted store keys.

@fioan89 fioan89 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thx for the PR

@fioan89
fioan89 merged commit d9fe029 into coder:main Aug 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants